home *** CD-ROM | disk | FTP | other *** search
- /*
- * illustrates the use of the gettimeofday routine
- *
- * If _ABI_SOURCE is defined, exclude the declaration of ``tz''
- * and call gettimeofday with only one argument
- */
-
- #include <sys/time.h>
-
- main ()
- {
- struct timeval tv;
- #ifndef _ABI_SOURCE
- struct timezone tz;
- #endif /* _ABI_SOURCE */
-
- #ifdef _ABI_SOURCE
- gettimeofday(&tv);
- #else
- gettimeofday(&tv, &tz);
- #endif
- }
-